# 基础镜像
FROM docker.io/library/openjdk:8@sha256:86e863cc57215cfb181bd319736d0baf625fe8f150577f9eb58bd937f5452cb8

# 设置工作目录
WORKDIR /usr/local/statistics

# 复制应用程序JAR包
#COPY ./target/charging-admin.jar /usr/charging/charging-admin.jar

# 复制日志备份脚本
#COPY backup_logs.sh /usr/charging/backup_logs.sh
# RUN chmod +x ./charging-admin.jar && ls -l ./charging-admin.jar
# RUN chmod +x ./backup_logs.sh && ls -l ./backup_logs.sh

# 设置环境变量
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
ENV TZ=Asia/Shanghai

# 启动命令
CMD ["sh", "-c", "java $JAVA_OPTS -jar ruoyi-admin.jar"]